package com.zl.smartmall.library.util;



import android.content.Context;
import android.content.SharedPreferences;
/**
 * 存储数据的时候用
 *@ClassName: ShareUtil 
 * @Description: TODO(这里用一句话描述这个类的作用) 
 * @author A18ccms a18ccms_gmail_com
 * @date 2016-3-21 下午2:22:27 
 * @author jindanke
 *
 */
public class ShareUtil {
	public static void setstringvalue(Context context,String key,String value){
		SharedPreferences settings = context.getSharedPreferences("mylife", 0);
		SharedPreferences.Editor editor =settings.edit();
		editor.putString(key, value);
		editor.commit();
	}

	public static String getstringvalue(Context context,String key){
		SharedPreferences settings = context.getSharedPreferences("mylife", 0);
		String name = settings.getString(key,"-1");
		return name;
	}
}
